package adv1;

import java.util.*;

public class ListTest2 {

	public static void main(String[] args) {
		List list = new ArrayList();
		list.add(new News("达兴被蚊子咬了", "达兴被蚊子咬了", "今天下午", "204"));
		list.add(250);
		for (int i = 1; i <= 10; i++) {
			list.add(new News("熊" + i + "打了熊" + (i + 1), "可爱", "今年春天", "东北"));
		}

		// System.out.println(list);
		for (Object o : list)
			System.out.println(o);

		// News temp = new News("熊5打了熊6", "可爱", "今年春天", "东北");
		News temp = new News("达兴被蚊子咬了", "", "下午", "205");
		// contains对象要根据情况，重写equals方法
		boolean in = list.contains(temp);
		System.out.println("这个新闻在不？" + in);
	}

}
